home *** CD-ROM | disk | FTP | other *** search
- Printing with 4xFORTH
-
-
- Overview
- --------
-
- Printing utilities and flexible output device control is provided
- as a natural part of 4xFORTH. These capabilities are detailed in
- this section.
-
-
- Named Load Streams
- ------------------
-
- Several groups of related software items have been developed, and
- loaders provided for them so that the system user need not load
- all of them at any one time. The following areas have been loaded
- in the DEMO system in such a way that they cannot be deleted. This
- would usually be under the control of the user.
-
- PRINTING \ Printing routines that
- \ allow I/O redirection
-
- DISKING \ Additional utilities for
- \ the manipulation of disk
- \ block. They are restricted
- \ to use with RAM.DISK in the
- \ demo.
-
- OPERATORS \ Additional operators.
-
-
- GRAPHICS \ Graphics routines.
-
-
- PRINTING
- --------
-
- Some basic printing routines have been defined to allow the user
- to direct the output to a default output device. The default
- output device is specifiable by the user.
-
- The output device which will be used, if PRINT is specified, is
- flagged in a variable called DEFAULT.PRINTER. The flag values
- are:
-
- 0 = Centronics parallel port
- 1 = Serial port
- 2 = Built-in CRT terminal
-
- Setting of this variable should be done using the "!" operator.
- e.g.:
-
- 0 DEFAULT.PRINTER ! \ set to centronics port
- or 1 DEFAULT.PRINTER ! \ set to serial port
-
-
-
- Enabling I/O Redirection
- ------------------------
-
- Simply setting the variable DEFAULT.PRINTER does not cause output
- to be redirected. The definition PRINT causes the redirection of
- output from the execution of the following definitions:
-
- LIST
- INDEX
- SHOW
- TYPIST
-
- The definition NOPRINT causes execution of the previous definitions
- to send data to crt screen. Thus
-
- PRINT 20 63 SHOW NOPRINT <cr>
-
- will cause the system to list blocks 20 to 63 inclusive to the printer
- selected by the value in DEFAULT.PRINTER, and then the I/O redirection
- will be terminated by the word NOPRINT.
-
-
- Printing Routines
- -----------------
-
- COLON LIST
-
- <blk#> LIST
-
- Print the block whose number is on the top of the stack. The block
- will be labeled with its number and each line will be numbered.
-
-
- COLON INDEX
-
- <first block> <last block> INDEX
-
- INDEX prints the first line of each block in the specified range.
- It is STRONGLY recommended that you reserve this line for some
- header that will tell you:
-
- 1. What area the code contained in the block
- relates to.
-
- 2. The sequence number within a related area.
-
- 3. The initials of the author,
-
- and 4. The date of the code.
-
-
- COLON SHOW
-
- <first block> <last block> SHOW
-
- List the blocks in the given range, three to a page. The listing
- will include a header whose selection is discussed in the primary
- documentation for 4xFORTH, labels for each block, and line numbers.
- The time of day and date may also be included if you desire it.
- This is discussed in the primary documentation for 4xFORTH.
-
-
- COLON TYPIST
-
- <first block> <last block> TYPIST
-
- Print the blocks specified as text without headers, separators, or
- line numbers. This definition allows the 4xFORTH system to be used
- as a simple text system ... a smart typewriter. Dumb, but very
- handy at times.
-
-
- Use of a Serial Printer
- -----------------------
-
- 4xFORTH does internal monitoring for XON and XOFF (^Q and ^S) during
- the printing process. The serial port need not be set to monitor
- for these characters.
-
-
- Finally
- -------
-
- The standard documentation for 4xFORTH further explains how the user
- can provide output device selection for ANY definition which prints
- things.
- ə